package com.jeespring.chapter01.section03;

class MyThread02 extends Thread{
	
	public MyThread02() {
		System.out.println("begin");
		System.out.println("Thread.currentThread().getName() = " + Thread.currentThread().getName());
		System.out.println("this.getName() = " + this.getName());
		System.out.println("end");
	}

	public void run() {
		System.out.println("run - begin");
		System.out.println("run - Thread.currentThread().getName() = " + Thread.currentThread().getName());
		System.out.println("run - this.getName() = " + this.getName());
		System.out.println("run - end");	}
}
public class Thread02{
	public static void main(String[] args) {
		MyThread02 myThread = new MyThread02();//...main thread-0
//		myThread.setName("B");
		Thread thread = new Thread(myThread,"A");
//		thread.setName("A");
		thread.start();//...A threand-0

	}
}
